import demo1.Login;
import demo1.UserKeywordException;
import demo1.UserNameException;

import java.util.InputMismatchException;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        int a = getData();
        System.out.println(a);
    }

    public static int getData() {
        try (Scanner scanner = new Scanner(System.in)) {
            int a = scanner.nextInt();
            return a;
        } catch (InputMismatchException e) {
            e.printStackTrace();
        }
        return 0;
    }

    public static void main5(String[] args) {
        Login login = new Login("zhangsan", "123456");

    }

    public static int func(Login login) {
        try {
            login.LoginImfo("zhangsan", "12345");
        } catch (UserNameException e) {
            e.printStackTrace();
        } catch (UserKeywordException e) {
            e.printStackTrace();
        } finally {
            return 1;
        }
    }

    public static void main4(String[] args) {
        int a = 0;
        a = func(new Login("s", "d"));
        System.out.println(a);
    }

    public static void main3(String[] args) {
        int k = countSegments("");
        System.out.println(k);
    }

    public static int countSegments(String s) {
        if (s.equals("")) {
            return 1;
        } else {
            String[] ss = s.split(" ");
            return ss.length;
        }

    }


    public static void main2(String[] args) {
        String s1 = "abc" + "def";//1
        String s2 = new String(s1);//2
        if (s1.equals(s2))//3
            System.out.println(".equals succeeded");//4
        if (s1 == s2)//5
            System.out.println("==succeeded");//6
    }
}
   /* public static boolean isAdmin(String userId){
        return userId.toLowerCase()=="admin";
    }
    public static void main(String[] args){
        System.out.println(isAdmin("Admin"));
    }*/

   /* public static void main1(String args[]){
        char[] ch={'a','b','c'};
        func1(ch);
        System.out.println(ch.length);
        func2(ch);
        System.out.println(ch[0]);
    }
    public static void func1(char[] ch){
        ch=new char[10];
    }

    public static void func2(char[] ch){

        ch[0]='1';
    }*/
//}

